/*
*  Copyright 2019-2023 Zheng Jie
*
*  Licensed under the Apache License, Version 2.0 (the "License");
*  you may not use this file except in compliance with the License.
*  You may obtain a copy of the License at
*
*  http://www.apache.org/licenses/LICENSE-2.0
*
*  Unless required by applicable law or agreed to in writing, software
*  distributed under the License is distributed on an "AS IS" BASIS,
*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*  See the License for the specific language governing permissions and
*  limitations under the License.
*/
package me.zhengjie.modules.system.domain;

import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.List;

/**
* @description /
* @author shitou
* @date 2024-04-21
**/
@Data
//@TableName("question")
public class QuestionDo implements Serializable {

    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty(value = "id")
    private Integer id;

    @ApiModelProperty(value = "题干")
    private String name;

    @ApiModelProperty(value = "学校id")
    private Integer schoolid;

    @ApiModelProperty(value = "附件")
    private String url;

    @ApiModelProperty(value = "题型")
    private Integer questionTypeId;

    @ApiModelProperty(value = "解析")
    private String analysis;

    @ApiModelProperty(value = "难度")
    private String difficulty;

    @ApiModelProperty(value = "是否发布")
    private Integer isPublish;

    @ApiModelProperty(value = "必须按顺序填写")
    private Integer isOrder;

    @ApiModelProperty(value = "是否上传图片")
    private Integer isUpload;

    @ApiModelProperty(value = "创作人")
    private Integer teacherid;

    @ApiModelProperty(value = "是否共享")
    private Integer isShare;

    @ApiModelProperty(value = "lastupdatetime")
    private Integer lastupdatetime;

    private Integer type;

    private List<Questionoption> options;

    private Integer isCaseSensitive;

    private Integer isTurnFill;

    private String stemFile;

    private String analysisFile;

    private Integer isAllowUploadFile;

    public void copy(QuestionDo source){
        BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
    }
}
